<!DOCTYPE html>
<html lang="en">
<head>
<title>huangliusong</title>
<script src="./vue.js"></script>
<style type="text/css">
	.fade-enter,
	.fade-leave-to
	{
		opacity:0
	}
	.fade-leave-active,
	.fade-enter-active
	{
		transition:opacity 3s;
	}
</style>
</head>
 
<body>
	<div id="root">
		<transition name="fade">
		<div v-if="show">黄柳淞</div>
		</transition>
		<button @click="handeClick">切换</button>
	</div>

	<script type="text/javascript">
	var vm=new Vue({
		el:"#root",
		data:{
			show:true
		},
		methods:{
			handeClick:function(){
				this.show=!this.show
			}
		}
	})
	</script>
</body>

</html>